Invoices, financial statements, and telephone records are examples of documents that typically contain information or data specific to a specific person or entity. The information or data contained in these documents is generally generated by a computer running a data extraction program designed to mine the data from a database. Periodically, a statement may be generated, printed and sent to an account holder for his/her records and review.
During early days of computer-generated documents, documents containing data specific to a certain account holder were printed on impact printers that were limited to producing line output of EBCDIC or ASCII characters. Accordingly, a data stream was formatted by a data extraction program such that each data record represented one line on the resulting printed document. FIG. 1a is an example of line data for a customer invoice produced by a data extraction program.
The formatted data was often printed on preproduced forms containing headers, footers, logos, lines, columns and rows. FIG. 1b is an example of the customer invoice resulting from the line data in FIG. 1a. 
As printer technology advanced, so did the demand for more sophisticated printed output. The advent of electrostatic and inkjet printers eliminated the need to have preprinted forms containing graphics, logos or any other standard data that is fixed for all documents of a certain type, since the printers were capable of printing both the standard data and the variable data concurrently.
Formatting programs were developed to reformat and remap line data received from the data extraction program and to merge the line data with the standard information on a document. However, because these formatting programs rely on line data received from legacy data extraction programs that did not have a mechanism to facilitate complex formatting the line data records, the formatting programs typically rely upon conditional processing to identify the occurrence of specific text strings or combinations thereof at specific locations in the line data to remap the line data based on these occurrences. One of the primary limitations of this remapping method is that it relies on the ability of the formatting program to distinguish between types of data based on the content of the line data. If two different types of data are similar in form, location and/or structure within the line data, the formatter may not be able to distinguish between. As a result, these formatting programs are limited with regard to the amount and complexity of the reformatting possible.
Another method used to format line data was to use the skip to channel controls to place line data sequentially on a printed page. Typically, a number from 1 to 12 was placed in the first two columns of a plurality of line data records. At first, the numbers were provided to indicate to an impact printer to skip a certain number of lines on a page before printing the succeeding data record for the purpose of saving printing time by not requiring the relatively slow impact printer to scroll across what would end up as blank lines on a finished document. As print technology advanced, the skip to channel numbers were used by a formatter to define placement of a line data record at a fixed vertical position on a page. For instance, a “1” in the first column of a line data record might indicate to skip to the next page before printing the line data following the number “1,” or a “2” might indicate that the line data following it be printed three lines below the top of the page. The process is limiting in that the skip to channel control only controls placement of a line record relative to the top of the page.
Another method of obtaining complex formatted printed documents has been to integrate the function of producing complex document layouts within the data extraction program. Essentially, the data extraction program formats the data record into a desired format rather than as line data. This method allows the creation of complex document formats but it can be expensive. For instance, a tailored data extraction program might be required for each document type, and any changes to a document's format requires that the data extraction program be reprogrammed. Additionally, any programmer tasked to program or reprogram the data extraction program to implement a new document format would potentially have access to sensitive data stored in the database; thereby, creating a potential security risk.
In view of the foregoing, it is desirable to have a method for formatting a document containing variable data that offers a high degree of flexibility in the arrangement of print data as to take full advantage of the capabilities of electrostatic and inkjet printers. It is also desirable that the method minimize the expense of generating formatted documents and that a format for a specific document be capable of easy modification without requiring access to the data extraction program.